package top.kaoshanji.p3ch12a;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * 代码清单-p3ch12a-376页b：使用泛型类型的示例
 * author kaoshanji
 * ^_^
 * create time 2025/2/5 18:27
 */
public class ObjectHolderUsage {

    private static final Logger logger = LogManager.getLogger(ObjectHolderUsage.class);

    public static void main(String[] args) {
        logger.info("...代码清单-p3ch12a-376页b：使用泛型类型的示例...");

        ObjectHolder<String> holder = new ObjectHolder<>();
        holder.setObject("Hello");

        String str = holder.getObject();

        logger.info("...泛型类型的值：{}...", str);
    }

}
